<extend name="Public/publicHTML"/>
<block name="nav">
    <link rel="stylesheet"  href="__COMMON__/bootstrap/css/bootstrap.min.css"/>
    <div class="nav">
        <div class="nav_title">
            <h4><img class="nav_img" src="__IMG__/tab.gif" /><span class="nav_a">文章列表</span></h4>
        </div>
        <div class="nav_button">
            <a href="{:U('add')}"><button class="button">+ 文章添加</button></a>
        </div>
    </div><br/><br/>
</block>
<block name="content">
    <table class="table table-hover">
        <tr align="center">
            <td>ID</td>
            <td>文章标题</td>
            <td>发布作者</td>
            <td>发布时间</td>
            <td>是否显示</td>
            <td>操作</td>
        </tr>
        <foreach name="rows" item="row">
            <tr align="center">
                <td>{$row.id}</td>
                <td>{$row.name}</td>
                <td>{$row.admin_account}</td>
                <td>{:date("Y-m-d",$row['create_time'])}</td>
                <td>
                    <if condition="$row.status eq 1">
                        <img src="__IMG__/yes.gif"/>
                        <else/>
                        <img src="__IMG__/no.gif"/>
                    </if>
                </td>
                <td>
                    <a class="btn btn-primary" href="{:U('Article/edit',['id'=>$row['id']])}">编辑</a>
                    <a class="btn btn-danger" href="{:U('Article/remove',['id'=>$row['id']])}">删除</a></if>
               </td>
            </tr>
            </tr>
        </foreach>
    </table>
    <div class="page"> {$page_show}</div>
</block>

